﻿using System.Web.Security;
using Sklep.WebUI.Infrastructure.Abstract;

namespace Sklep.WebUI.Infrastructure.Concrete
{
    public class FormsAuthProvider : IAuthProvider
    {
        public bool Authenticate(string userName, string password)
        {
            bool result = FormsAuthentication.Authenticate(userName, password);
            if(result)
                FormsAuthentication.SetAuthCookie(userName,false);

            return result;
        }
    }
}